package demo.spring.restful.domain;

public final class Computer {
	
	private long id;
	
	private String model;
    
    private double size;
     
    private int memory;
    
    private double price;
 
    public Computer(){
        id=0;
    }
     
    public Computer(long id, String model, double size, int memory, double price){
    	this.model = model;
    	this.size = size;
    	this.memory = memory;
    	this.price = price;
    }
   
    
   public long getId() {
        return id;
    }
 
   public void setId(long id) {
        this.id = id;
    }
  	
   public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public double getSize() {
		return size;
	}

	public void setSize(double size) {
		this.size = size;
	}

	public double getMemory() {
		return memory;
	}

	public void setMemory(int memory) {
		this.memory = memory;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}
	
	

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int) (id ^ (id >>> 32));
        return result;
    }

	
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Computer other = (Computer) obj;
        if (id != other.id)
            return false;
        return true;
    }
 
    @Override
    public String toString() {
        return "Computer [id=" + id + ", model=" + model + ", size=" + size
                + ", memory="+memory+", price=" + price + "]";
    }
}
 